package com.mingdong.first.factory.method;

import com.mingdong.first.factory.pizza.ChinesePizza;
import com.mingdong.first.factory.pizza.EnglishPizza;
import com.mingdong.first.factory.pizza.Pizza;
import com.mingdong.first.factory.pizza.USAPizza;

public class ChineseOrderPizza extends OrderPizza{

	@Override
	public Pizza createPizza(String type) {
		Pizza pizza = null;
		
		if(type.equals("chinese")){
			pizza = new ChinesePizza();
			
		}else if(type.equals("english")){
			pizza = new EnglishPizza();
		}else if(type.equals("usa")){
			pizza = new USAPizza();
		}
		return pizza;
	}

}
